const player_tank = new CreateTank(
    canvas,
    ctx,
    1,
    5,
    '#c7823d',
    [70, 70],
    Math.ceil(Math.random() * 200) + Math.ceil(Math.random() * 200)
)
all_tank.set(player_tank.id, player_tank)
players_tank.set(player_tank.id, player_tank)
function createComputerTank() {
    const x = Math.ceil(Math.random() * cvs_width)
    const y = Math.ceil(Math.random() * cvs_height)
    const c_computer_tank = new CreateTank(
        canvas,
        ctx,
        2,
        5,
        '#c7823d',
        [x, y],
        Math.ceil(Math.random() * 200) + Math.ceil(Math.random() * 200)
    )
    all_tank.set(c_computer_tank.id, c_computer_tank)
    computer_players_tank.set(c_computer_tank.id, c_computer_tank)
}
createComputerTank()



function start() {
    ctx.clearRect(0, 0, cvs_width, cvs_height)
    all_tank.forEach((tank) => {
        tank.drawTankFull()
    })
    all_bullet.forEach((bullet) => {
        bullet.movingTrajectory()
    })
    special_effects_list.forEach((effect) => {
        effect.drawEffect()
    })
    requestAnimationFrame(start)
}

start()
